Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JointTrajectoryController] Add velocity-only command option for JTC with closed loop controller #239

Merged
merged 22 commits into from
Jan 26, 2022

Conversation

livanov93
Copy link
Contributor

@livanov93 livanov93 commented Sep 13, 2021

Introduce velocity-only command interface for JointTrajectoryController and extend tests for its usage.

Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Can you add some tests?

@livanov93
Copy link
Contributor Author

This looks good. Can you add some tests?

I can. I will follow the currently existing tests in the jtc package and add one to test velocity interface.

@destogl
Copy link
Member

destogl commented Sep 14, 2021

I can. I will follow the currently existing tests in the jtc package and add one to test velocity interface.

Maybe you are lucky and can add simply a new parameterized test. Check the end of the file (before the last test). Last test should also be changed because it will fail if VELOCITY interface is enabled.

Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, just some minor comment to polish things

@livanov93
Copy link
Contributor Author

@destogl what is the decision with this?

Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine! thanks!


if (traj_controller_->get_has_velocity_command_interface())
{
EXPECT_GT(0.0, joint_vel_[0]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that velocity can/should be smaller then 0?

Copy link
Contributor Author

@livanov93 livanov93 Jan 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@destogl The idea was to set jumbled order of joint names and to set velocity with a wrong sign. The test is initialized, and the commands and states are set to zero. Here I want joints to go from {0.0, 0.0, 0.0} to {1.0, 2.0, 3.0} with velocity {-0.1, -0.1, -0.1} and if the velocity command interface is active, I know that PID should revert these velocity values into positive ones.
@bmagyar what do you think about it?

Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still approve this after @bmagyar's changes. We should only clarify if we should reset initial velocity to 0.0 or to current velocity of the hardware.

Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bmagyar you can go with merge

@bmagyar bmagyar merged commit 1fd8bc3 into ros-controls:master Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants